package com.designpatterns.decoratorpattern.decorator;

import com.designpatterns.decoratorpattern.component.Coffee;

public class DecoratorSugr extends CoffeeDecorator {
    Coffee coffee;

    public DecoratorSugr(Coffee coffee) {
        this.coffee = coffee;
    }

    @Override
    public String getDescription() {
        return coffee.getDescription()+"+糖";
    }

    @Override
    public double cost() {
        return 0.5+coffee.cost();
    }
}
